﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IEducation" here, you must also update the reference to "IEducation" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IEducation
    {
        [OperationContract]
        DataSet Education_GetAll();

        [OperationContract]
        DataSet Education_GetByEmployeeID(int _EmployeeID);

        [OperationContract]
        EducationInfo Education_GetInfo(int EducationID);

        [OperationContract]
        DataSet Education_GetList(out int ItemCount, int currentPage, int pageSize, int branchID, int departmentID, int month, int year);

        [OperationContract]
        int Education_Insert(EducationInfo eInfo);

        [OperationContract]
        bool Education_Update(EducationInfo eInfo);

        [OperationContract]
        bool Education_Delete(int EducationID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class EducationInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        string _Kind;
        [DataMember]
        public string Kind
        {
            get { return _Kind; }
            set { _Kind = value; }
        }

        string _Major;
        [DataMember]
        public string Major
        {
            get { return _Major; }
            set { _Major = value; }
        }

        bool _Foreign;
        [DataMember]
        public bool Foreign
        {
            get { return _Foreign; }
            set { _Foreign = value; }
        }

        string _Place;
        [DataMember]
        public string Place
        {
            get { return _Place; }
            set { _Place = value; }
        }

        DateTime _FromDate;
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }

        string _Time;
        [DataMember]
        public string Time
        {
            get { return _Time; }
            set { _Time = value; }
        }

        //DateTime _FinishDate;
        //[DataMember]
        //public DateTime FinishDate
        //{
        //    get { return _FinishDate; }
        //    set { _FinishDate = value; }
        //}

        DateTime _DateIssue;
        [DataMember]
        public DateTime DateIssue
        {
            get { return _DateIssue; }
            set { _DateIssue = value; }
        }
        string _AuthorIssue;
        [DataMember]
        public string AuthorIssue
        {
            get { return _AuthorIssue; }
            set { _AuthorIssue = value; }
        }

        string _Rank;
        [DataMember]
        public string Rank
        {
            get { return _Rank; }
            set { _Rank = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }
}

